package com.wealth.lottery.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.wealth.member.entity.Member;
import com.wealth.system.entity.Corporation;
/**
 * 中奖记录
 * @author lihang 2016-06-27
 *
 */
@Entity
@Table(name="lottery_record")
public class LotteryRecord  implements Serializable{
	private static final long serialVersionUID = 1L;
	private Long id; //主键id
	private Member member;//粉丝id fans_id
	private int status;//状态 0:未中奖 1:已中奖，2：已发奖
	private Date createTime;//create_time
	private String creator;
	private LotteryActivity lotteryactivity;//活动id lottery_id
	private LotteryPrize prize;//商品id prize_id
	private Corporation corp;//corp_id
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	@ManyToOne
	@JoinColumn(name="member_id")
	public Member getMember() {
		return member;
	}
	public void setMember(Member member) {
		this.member = member;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	
	public String getCreator() {
		return creator;
	}
	public void setCreator(String creator) {
		this.creator = creator;
	}
	@Column(name="create_time")
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@ManyToOne
	@JoinColumn(name="lottery_id")
	public LotteryActivity getLotteryactivity() {
		return lotteryactivity;
	}
	public void setLotteryactivity(LotteryActivity lotteryactivity) {
		this.lotteryactivity = lotteryactivity;
	}
	@ManyToOne
	@JoinColumn(name="prize_id")
	public LotteryPrize getPrize() {
		return prize;
	}
	public void setPrize(LotteryPrize prize) {
		this.prize = prize;
	}
	@ManyToOne
	@JoinColumn(name="corp_id")
	public Corporation getCorp() {
		return corp;
	}
	public void setCorp(Corporation corp) {
		this.corp = corp;
	}

}
